#include "CommonDefine.h"

#include "Application.h"
#include <iostream>

#include "concurrent/ThreadManager.h"

int main() {
  LOG_TEST("Hello World")
  ThreadManager::Instance();


  auto pThread = new Application();
  ThreadManager::Instance()->createThread(pThread);

  int32_t what = 0;
  while (what != -1) {
    fprintf(stderr, "请输入:");
    std::cin >> what;
    pThread->sendMessage(what);
  }

  ThreadManager::Instance()->destroyThread(pThread);
  ThreadManager::Destroy();

  return 0;
}